<template>
    <div class="search">
        <site-topbar></site-topbar>
        <site-header @search="searchValue"></site-header>
        <site-list :list="list" :value="val"></site-list>
        <site-footer></site-footer>
    </div>
</template>

<script>
    import SiteHeader from '../public/SiteHeader'
    import SiteTopbar from '../public/SiteTopbar'
    import SiteList from '../search/SiteList'
    import SiteFooter from '../public/SiteFooter'

    export default {
        data() {
            return {
                list: {},
                val: ''
            }
        },
        name: "index",
        components: {
            'site-header': SiteHeader,
            'site-topbar': SiteTopbar,
            'site-list': SiteList,
            'site-footer': SiteFooter,
        },
        mounted() {
            this.init();
        },
        methods: {
            init() {
                this.list = this.$route.params.data;
                this.val = this.$route.params.baseUrl;
            },
             searchValue(e) {
                console.log("获取值", e);
                this.list = e.data;
                this.val = e.baseUrl;
            }
        }
    }
</script>

<style scoped>

</style>
